<script setup>
const emit = defineEmits()

const props = defineProps({
  loading: {
    type: Boolean,
    default: false
  },
  leftText: {
    type: String,
    default: '取消'
  },
  rightText: {
    type: String,
    default: '保存'
  },
  rightIsShow: {
    type: Boolean,
    default: false
  },
  leftIsShow: {
    type: Boolean,
    default: false
  }
})
</script>

<template>
  <div class="flex-between btn mt10">
    <div></div>
    <div>
      <el-button v-show="!props.rightIsShow" :loading="props.loading" type="primary" @click="emit('submit')">{{
        props.rightText
      }}</el-button>
      <el-button v-show="!props.leftIsShow" @click="emit('close')">{{ props.leftText }}</el-button>
    </div>
  </div>
</template>

<style lang="scss" scoped></style>
